﻿using EFModel;
using IServices;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Y2.Filters;

namespace Y2.Controllers
{
    [LoginFilter]
    public class major_changeSeController : Controller
    {
        private readonly Imajor_change he;

        public major_changeSeController(Imajor_change he)
        {
            this.he = he;
        }

        public IActionResult major_changeSe()
        {
            return View();
        }
        public IActionResult major_changeSeQuery(int? id)
        {
            ViewBag.mch_id = id;
            return View();
        }
        //调动复核通过查询
        public async Task<IActionResult> QuerSe(int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.QuerSe(currentPage, pageSize)));
        }
        //调动模糊查询
        public async Task<IActionResult> QuerSeo(major_change major_, int currentPage, int pageSize)
        {
            return Content(JsonConvert.SerializeObject(await he.QuerSeo(major_, currentPage, pageSize)));
        }
    }
}
